]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
overviewControls: Don't update work area box when headless
authorJonas Ådahl <jadahl@gmail.com>
Thu, 8 Sep 2022 10:31:15 +0000 (12:31 +0200)
committerMarge Bot <marge-bot@gnome.org>
Thu, 15 Sep 2022 11:51:08 +0000 (11:51 +0000)
When headless, we don't have a monitor we can derive a size from, so
don't even try, just let it be updated when we actually have a monitor
that will show stuff.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5831
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2478>

js/ui/overviewControls.js

index d4dccbddbaf2e2b9d6b452485f4b9b2c553d2c68..fa8202ee88259ffb015b9d8cc011774af73384e7 100644 (file)
@@ -55,6 +55,9 @@ class ControlsManagerLayout extends Clutter.BoxLayout {
 
     _updateWorkAreaBox() {
         const monitor = Main.layoutManager.primaryMonitor;
+        if (!monitor)
+            return;
+
         const workArea = Main.layoutManager.getWorkAreaForMonitor(monitor.index);
         const startX = workArea.x - monitor.x;
         const startY = workArea.y - monitor.y;